home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr11 / powerb5.zip / P5MSC000.TIP < prev    next >
Text File  |  1993-06-01  |  2KB  |  43 lines

  1. When you or your staff enter data into a computer, it's easy
  2. to mistype or misread an ID or account number. Such errors
  3. can cost your organization dearly especially if funds find
  4. their way into (or out of) the wrong account. These two
  5. QuickBasic/QBASIC programs help you prevent this problem by
  6. generating and then verifying account numbers with check
  7. digits. Besides guarding against typos, this technique can
  8. help protect you from fraud; nine times out of ten it will
  9. catch a fabricated ID number. MAKE_ID.BAS adds a sixth digit
  10. to any five-digit number you give it. (It does this by
  11. adding the first, third, and fifth digits to twice the
  12. second and fourth digits and concatenating the least
  13. significant digit of the sum to the original number.)
  14. CHECK_ID.BAS tests the validity of a MAKE_ID.BAS-generated
  15. ID number by running the first five digits through the same
  16. formula, then comparing the result to the sixth digit of the
  17. number being tested.
  18.  
  19. Bill Hopkins
  20. Marble Hill, Missouri
  21.  
  22. Editor's Note: Check digits have been used for many years in
  23. credit card numbers, supermarket bar codes, and even the
  24. ISBN numbers found on books. If you want even greater
  25. security, you can create ID numbers with multiple check
  26. digits or with check characters that can take the form of
  27. letters or digits. I've enhanced Mr. Hopkins's code, without
  28. changing the underlying algorithm, to be more bulletproof
  29. and to work with arrays rather than simply with character
  30. strings. The files CHECK_ID.BAS and MAKE_ID.BAS both appear
  31. in the P5UTL directory of your PowerBase *.* Volume 5
  32. diskette. You can use these utilities as-is or copy the
  33. GenID and CheckID subroutines, which generate and check the
  34. ID numbers, into your own BASIC code.
  35.  
  36.  
  37. Title: BASIC ID Number Generator
  38. Category: MSC
  39. Issue Date: March, 1992
  40. Editor: Brett Glass
  41. Supplementary Files: P5UTL\CHECK_ID.BAS, P5UTL\MAKE_ID.BAS
  42. Filename: P5MSC000.TIP
  43.